<?php

class DefaultController extends Controller
{
	public function actionIndex()
	{
        $dataProvider=new CActiveDataProvider('Article', array(
        'criteria'=>array(
            'condition'=>'is_visible = :visible',
            'params'=>array(':visible'=>true))));

        $this->render('index',array(
            'dataProvider'=>$dataProvider,
        ));
	}

    public function actionShow($id){
        $model = Article::model()->findByPk($id);
        $this->render('show',array(
            'model'=>$model,
        ));
    }
}